<!DOCTYPE html>
<html lang="zh">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>修改用户信息</title>
  <style>
    body {
      font-family: 'Arial', sans-serif;
      margin: 0;
      padding: 0;
      background: linear-gradient(135deg, #a1c4fd 0%, #c2e9fb 100%);
      height: 100vh;
      display: flex;
      justify-content: center;
      align-items: center;
    }

    .container {
      width: 100%;
      max-width: 400px;
      padding: 30px;
      background-color: #fff;
      box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
      border-radius: 12px;
      text-align: center;
    }

    h1 {
      font-size: 28px;
      color: #333;
      margin-bottom: 20px;
      font-weight: 600;
    }

    label {
      font-size: 16px;
      color: #555;
      margin: 12px 0;
      display: block;
    }

    input[type="text"],
    input[type="number"],
    select,
    button {
      width: 100%;
      padding: 10px;
      margin: 8px 0;
      display: inline-block;
      border: 1px solid #ccc;
      border-radius: 4px;
      box-sizing: border-box;
    }

    button {
      background-color: #4CAF50;
      color: white;
      border: none;
      border-radius: 8px;
      cursor: pointer;
      transition: background-color 0.3s ease;
    }

    button:hover {
      background-color: #45a049;
    }
  </style>
</head>

<body>
<div class="container">
  <h1>修改用户信息</h1>
  <form action="/updateUser" method="post">
    <input type="hidden" name="id" th:value="${user.id}">

    <label for="name">用户名:</label>
    <input type="text" id="name" name="name" th:value="${user.name}" required><br><br>

    <label for="name">密码:</label>
    <input type="text" id="password" name="password" th:value="${user.password}" required><br><br>

    <label for="age">年龄:</label>
    <input type="number" id="age" name="age" th:value="${user.age}" required><br><br>

    <label for="gender">性别:</label>
    <select id="gender" name="gender" th:value="${user.gender}">
      <option value="男">男</option>
      <option value="女">女</option>
    </select><br><br>

    <button type="submit">提交</button>
  </form>
</div>
</body>

</html>